$('#add').click(function () {
	 var formData = new FormData(); 
		formData.set("citrusName",$("#citrus_name").val());
		formData.set("description",$("#description").val());
		formData.set("period",$("#period").val());
		formData.set("filePath", document.getElementById("file_path").files[0]);
//		formData.set("imgPath",$("#img_path").val());
	    $.ajax({
	        url: "/citrusmonitor/citrus.do?method=addCitrus",
	        type: "post",
	        data:formData, 
	        processData:false, 
	        contentType:false, 
	        dataType: "json",
	        success: function (msg) {
	            if (msg.status==1) {
	                alert("添加成功");
	                window.location.href="show.html";
	            } else {
	                alert("添加失败" );
	            }
        },
        error:function(){
            alert("资源加载失败！！！");
        }
    })
})